

# Centos 6.4 安装Python 2.7 python-pip
# http://www.cnblogs.com/balaamwe/p/3480430.html




# http://mirrors.sohu.com/python/2.7.13/Python-2.7.13.tgz




# Python build finished, but the necessary bits to build these modules were
# http://blog.csdn.net/huanle0610/article/details/41174943



# centos的epel里面有个3.4.3的
# 但是为什么要安装3.5及以上，是因为ansible最低支持python3的版本是python3.5


./configure --prefix=/usr/local/python2.7 --with-ensurepip=install




# 这个优化选项建议在之后遇到瓶颈的时候再做
# 编译安装一次,要50分钟左右
If you want a release build with all optimizations active (LTO, PGO, etc),
please run ./configure --enable-optimizations
./configure --prefix=/usr/local/python3.5 --with-ensurepip=install --enable-optimizations


# 优化安装后的测试
: # FIXME: can't run for a cross build
./python -m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess || true



